Fix DevTunnel health check for auto-selected regions - #19230
Damian Edwards (DamianEdwards) merged 4 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19230Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19230" |
|
@microsoft-github-policy-service agree |
|
I'm also suffering with this issue and this fix might solve it. However, sharing two things that might be relevant here:
|
Thanks, this is helpful context. Explicitly setting This change addresses that case by using the cluster-qualified tunnel ID returned by |
Damian Edwards (DamianEdwards)
left a comment
There was a problem hiding this comment.
Found one qualified-ID compatibility gap in the startup path.
PR #19230 Testing ReportPR information
Artifact verificationThe PR's common The normal Windows dogfood installation could not be used because the workflow Behavior verificationCurrent behaviorA disposable tunnel created with an unqualified ID returned a qualified ID from
The bare-ID query later succeeded after propagation for a tunnel in the account's Regression testThe new
PR package end-to-endTwo fresh file-based AppHosts used the PR package:
The complete Review finding
Other observations
ResultThe health-check change is correct and fixes the claimed access-query failure, |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Thanks, this makes sense. I preserved the cluster-qualified ID returned by |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
PR Testing ReportPR Information
Artifact Version Verification
The installed PR artifact's embedded commit matches the PR head. Test Environment
Test ScenariosScenario 1: Focused DevTunnel regression testsStatus: PASS Ran the four startup and health-check tests that exercise explicit and auto-selected regions:
Result: 4 passed, 0 failed. Scenario 2: Fresh auto-selected-region AppHostStatus: PASS Started a fresh anonymous DevTunnel without specifying a region.
This exercised the changed production path end to end: Aspire created the tunnel with a bare ID, captured the qualified ID returned by the DevTunnel service, created the port, and completed the tunnel health check. Scenario 3: Existing-tunnel restartStatus: PASS Stopped and restarted the same AppHost so Aspire encountered the existing tunnel and exercised its update/recreation path.
Scenario 4: Bare versus qualified per-port access lookupStatus: PASS, with changed upstream behavior Compared direct per-port access-list calls against the same live tunnel:
DevTunnel CLI Scenario 5: Explicit
|
| Scenario | Status | Notes |
|---|---|---|
| PR artifact/version verification | PASS | Installed artifact matches PR head |
| Focused regression tests | PASS | 4/4 passed |
| Fresh auto-region E2E | PASS | Qualified ID captured; tunnel and port healthy |
| Existing-tunnel restart | PASS | Update/recreation path healthy on new port |
| Bare/qualified access comparison | PASS | Both accepted by current DevTunnel CLI |
| Explicit-region control | BLOCKED | Regional endpoint treated logged-in client as anonymous before changed logic ran |
Overall Result
PR VERIFIED for the changed auto-selected-region behavior.
The exact production scenario targeted by the PR passed with the PR artifact, including a restart. No PR regression was found. The explicit-region control remains inconclusive because the regional DevTunnel service rejected tunnel creation before the relevant code path.
Cleanup
- Explicit-region AppHost stopped successfully.
- Auto-region AppHost stopped successfully.
- Test tunnel
tunnel-2f17adde.aue01deleted successfully.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6795e967-8f9c-4449-84e9-5dfe530ddfba
Updated [Aspire.Hosting.JavaScript](https://github.com/microsoft/aspire) from 13.5.3 to 13.5.4. <details> <summary>Release notes</summary> _Sourced from [Aspire.Hosting.JavaScript's releases](https://github.com/microsoft/aspire/releases)._ ## 13.5.4 ## What's New in Aspire 13.5.4 Patch release for Aspire 13.5 that fixes Kafka health-check resource leaks, DevTunnel errors with automatically selected regions, misleading Azure emulator dashboard entries, and unintended changes to generated starter apps, plus Homebrew compatibility and Radius API diagnostic updates. ### 🐛 Fixes - 📨 **Kafka health checks leaked producers and polling threads** — Each AppHost health-check execution created a new Kafka producer without disposing it, accumulating background threads over time. Health checks now reuse a producer per Kafka resource and dispose it with the AppHost, while keeping multiple Kafka resources independently configured. Fixes [#20091](microsoft/aspire#20091). ([#20094](microsoft/aspire#20094), backport of [#20092](microsoft/aspire#20092), @davidfowl) - 🌐 **DevTunnels could fail when the region was selected automatically** — Tunnel setup and health checks now use the cluster-qualified tunnel ID returned by the DevTunnel CLI for port operations and access queries. This fixes failures when a bare tunnel ID cannot be resolved for those operations. Regression introduced in 13.3. Fixes [#18790](microsoft/aspire#18790). ([#19853](microsoft/aspire#19853), backport of [#19230](microsoft/aspire#19230), @Vladipz) - ☁️ **Emulator-only AppHosts showed an unused Azure environment** — The dashboard now hides the `azure-environment` resource when no Azure resources require cloud provisioning, instead of leaving it visible in **Not started**. It remains visible for apps that combine local emulators with resources requiring Azure provisioning. No AppHost changes are needed. Fixes [#19617](microsoft/aspire#19617). ([#19998](microsoft/aspire#19998), backport of [#19843](microsoft/aspire#19843), @eerhardt) - 🧩 **Starter app generation could alter unrelated JavaScript values** — Dynamic port replacement could also replace matching numeric literals in bundled JavaScript, including Bootstrap timing values. Port substitutions are now restricted to `localhost:` URLs, preserving the original library files while still configuring the requested ports. Fixes [#20030](microsoft/aspire#20030). ([#20110](microsoft/aspire#20110), backport of [#20031](microsoft/aspire#20031), @bart-vmware, @JamesNK) - 🍎 **Updated the Aspire Homebrew cask for Homebrew 6.x** — Replaced deprecated cask URL and post-install syntax with the supported equivalents, resolving compatibility issues with current Homebrew while preserving install-channel metadata. ([#20119](microsoft/aspire#20119), backport of [#19965](microsoft/aspire#19965), @askpt, @joperezr) - 🧪 **Radius cloud-provider callback interfaces now carry the experimental diagnostic** — `IAwsRadiusProviderBuilder` and `IAzureRadiusProviderBuilder` are now marked with `ASPIRERADIUS003`, matching the existing `WithAwsProvider` and `WithAzureProvider` methods. Code referencing these interfaces directly must now acknowledge the same experimental API diagnostic. ([#19874](microsoft/aspire#19874), @sebastienros) --- *Full Changelog: [v13.5.3...v13.5.4](microsoft/aspire@v13.5.3...v13.5.4)* *Full commit: [9c1b401dd67746739044f68959cbf4d3d7af93a6](microsoft/aspire@9c1b401dd67746739044f68959cbf4d3d7af93a6)* Commits viewable in [compare view](microsoft/aspire@v13.5.3...v13.5.4). </details> Updated [Aspire.Hosting.PostgreSQL](https://github.com/microsoft/aspire) from 13.5.3 to 13.5.4. <details> <summary>Release notes</summary> _Sourced from [Aspire.Hosting.PostgreSQL's releases](https://github.com/microsoft/aspire/releases)._ ## 13.5.4 ## What's New in Aspire 13.5.4 Patch release for Aspire 13.5 that fixes Kafka health-check resource leaks, DevTunnel errors with automatically selected regions, misleading Azure emulator dashboard entries, and unintended changes to generated starter apps, plus Homebrew compatibility and Radius API diagnostic updates. ### 🐛 Fixes - 📨 **Kafka health checks leaked producers and polling threads** — Each AppHost health-check execution created a new Kafka producer without disposing it, accumulating background threads over time. Health checks now reuse a producer per Kafka resource and dispose it with the AppHost, while keeping multiple Kafka resources independently configured. Fixes [#20091](microsoft/aspire#20091). ([#20094](microsoft/aspire#20094), backport of [#20092](microsoft/aspire#20092), @davidfowl) - 🌐 **DevTunnels could fail when the region was selected automatically** — Tunnel setup and health checks now use the cluster-qualified tunnel ID returned by the DevTunnel CLI for port operations and access queries. This fixes failures when a bare tunnel ID cannot be resolved for those operations. Regression introduced in 13.3. Fixes [#18790](microsoft/aspire#18790). ([#19853](microsoft/aspire#19853), backport of [#19230](microsoft/aspire#19230), @Vladipz) - ☁️ **Emulator-only AppHosts showed an unused Azure environment** — The dashboard now hides the `azure-environment` resource when no Azure resources require cloud provisioning, instead of leaving it visible in **Not started**. It remains visible for apps that combine local emulators with resources requiring Azure provisioning. No AppHost changes are needed. Fixes [#19617](microsoft/aspire#19617). ([#19998](microsoft/aspire#19998), backport of [#19843](microsoft/aspire#19843), @eerhardt) - 🧩 **Starter app generation could alter unrelated JavaScript values** — Dynamic port replacement could also replace matching numeric literals in bundled JavaScript, including Bootstrap timing values. Port substitutions are now restricted to `localhost:` URLs, preserving the original library files while still configuring the requested ports. Fixes [#20030](microsoft/aspire#20030). ([#20110](microsoft/aspire#20110), backport of [#20031](microsoft/aspire#20031), @bart-vmware, @JamesNK) - 🍎 **Updated the Aspire Homebrew cask for Homebrew 6.x** — Replaced deprecated cask URL and post-install syntax with the supported equivalents, resolving compatibility issues with current Homebrew while preserving install-channel metadata. ([#20119](microsoft/aspire#20119), backport of [#19965](microsoft/aspire#19965), @askpt, @joperezr) - 🧪 **Radius cloud-provider callback interfaces now carry the experimental diagnostic** — `IAwsRadiusProviderBuilder` and `IAzureRadiusProviderBuilder` are now marked with `ASPIRERADIUS003`, matching the existing `WithAwsProvider` and `WithAzureProvider` methods. Code referencing these interfaces directly must now acknowledge the same experimental API diagnostic. ([#19874](microsoft/aspire#19874), @sebastienros) --- *Full Changelog: [v13.5.3...v13.5.4](microsoft/aspire@v13.5.3...v13.5.4)* *Full commit: [9c1b401dd67746739044f68959cbf4d3d7af93a6](microsoft/aspire@9c1b401dd67746739044f68959cbf4d3d7af93a6)* Commits viewable in [compare view](microsoft/aspire@v13.5.3...v13.5.4). </details> Updated [Aspire.Hosting.Redis](https://github.com/microsoft/aspire) from 13.5.3 to 13.5.4. <details> <summary>Release notes</summary> _Sourced from [Aspire.Hosting.Redis's releases](https://github.com/microsoft/aspire/releases)._ ## 13.5.4 ## What's New in Aspire 13.5.4 Patch release for Aspire 13.5 that fixes Kafka health-check resource leaks, DevTunnel errors with automatically selected regions, misleading Azure emulator dashboard entries, and unintended changes to generated starter apps, plus Homebrew compatibility and Radius API diagnostic updates. ### 🐛 Fixes - 📨 **Kafka health checks leaked producers and polling threads** — Each AppHost health-check execution created a new Kafka producer without disposing it, accumulating background threads over time. Health checks now reuse a producer per Kafka resource and dispose it with the AppHost, while keeping multiple Kafka resources independently configured. Fixes [#20091](microsoft/aspire#20091). ([#20094](microsoft/aspire#20094), backport of [#20092](microsoft/aspire#20092), @davidfowl) - 🌐 **DevTunnels could fail when the region was selected automatically** — Tunnel setup and health checks now use the cluster-qualified tunnel ID returned by the DevTunnel CLI for port operations and access queries. This fixes failures when a bare tunnel ID cannot be resolved for those operations. Regression introduced in 13.3. Fixes [#18790](microsoft/aspire#18790). ([#19853](microsoft/aspire#19853), backport of [#19230](microsoft/aspire#19230), @Vladipz) - ☁️ **Emulator-only AppHosts showed an unused Azure environment** — The dashboard now hides the `azure-environment` resource when no Azure resources require cloud provisioning, instead of leaving it visible in **Not started**. It remains visible for apps that combine local emulators with resources requiring Azure provisioning. No AppHost changes are needed. Fixes [#19617](microsoft/aspire#19617). ([#19998](microsoft/aspire#19998), backport of [#19843](microsoft/aspire#19843), @eerhardt) - 🧩 **Starter app generation could alter unrelated JavaScript values** — Dynamic port replacement could also replace matching numeric literals in bundled JavaScript, including Bootstrap timing values. Port substitutions are now restricted to `localhost:` URLs, preserving the original library files while still configuring the requested ports. Fixes [#20030](microsoft/aspire#20030). ([#20110](microsoft/aspire#20110), backport of [#20031](microsoft/aspire#20031), @bart-vmware, @JamesNK) - 🍎 **Updated the Aspire Homebrew cask for Homebrew 6.x** — Replaced deprecated cask URL and post-install syntax with the supported equivalents, resolving compatibility issues with current Homebrew while preserving install-channel metadata. ([#20119](microsoft/aspire#20119), backport of [#19965](microsoft/aspire#19965), @askpt, @joperezr) - 🧪 **Radius cloud-provider callback interfaces now carry the experimental diagnostic** — `IAwsRadiusProviderBuilder` and `IAzureRadiusProviderBuilder` are now marked with `ASPIRERADIUS003`, matching the existing `WithAwsProvider` and `WithAzureProvider` methods. Code referencing these interfaces directly must now acknowledge the same experimental API diagnostic. ([#19874](microsoft/aspire#19874), @sebastienros) --- *Full Changelog: [v13.5.3...v13.5.4](microsoft/aspire@v13.5.3...v13.5.4)* *Full commit: [9c1b401dd67746739044f68959cbf4d3d7af93a6](microsoft/aspire@9c1b401dd67746739044f68959cbf4d3d7af93a6)* Commits viewable in [compare view](microsoft/aspire@v13.5.3...v13.5.4). </details> Updated [Aspire.Hosting.Testing](https://github.com/microsoft/aspire) from 13.5.3 to 13.5.4. <details> <summary>Release notes</summary> _Sourced from [Aspire.Hosting.Testing's releases](https://github.com/microsoft/aspire/releases)._ ## 13.5.4 ## What's New in Aspire 13.5.4 Patch release for Aspire 13.5 that fixes Kafka health-check resource leaks, DevTunnel errors with automatically selected regions, misleading Azure emulator dashboard entries, and unintended changes to generated starter apps, plus Homebrew compatibility and Radius API diagnostic updates. ### 🐛 Fixes - 📨 **Kafka health checks leaked producers and polling threads** — Each AppHost health-check execution created a new Kafka producer without disposing it, accumulating background threads over time. Health checks now reuse a producer per Kafka resource and dispose it with the AppHost, while keeping multiple Kafka resources independently configured. Fixes [#20091](microsoft/aspire#20091). ([#20094](microsoft/aspire#20094), backport of [#20092](microsoft/aspire#20092), @davidfowl) - 🌐 **DevTunnels could fail when the region was selected automatically** — Tunnel setup and health checks now use the cluster-qualified tunnel ID returned by the DevTunnel CLI for port operations and access queries. This fixes failures when a bare tunnel ID cannot be resolved for those operations. Regression introduced in 13.3. Fixes [#18790](microsoft/aspire#18790). ([#19853](microsoft/aspire#19853), backport of [#19230](microsoft/aspire#19230), @Vladipz) - ☁️ **Emulator-only AppHosts showed an unused Azure environment** — The dashboard now hides the `azure-environment` resource when no Azure resources require cloud provisioning, instead of leaving it visible in **Not started**. It remains visible for apps that combine local emulators with resources requiring Azure provisioning. No AppHost changes are needed. Fixes [#19617](microsoft/aspire#19617). ([#19998](microsoft/aspire#19998), backport of [#19843](microsoft/aspire#19843), @eerhardt) - 🧩 **Starter app generation could alter unrelated JavaScript values** — Dynamic port replacement could also replace matching numeric literals in bundled JavaScript, including Bootstrap timing values. Port substitutions are now restricted to `localhost:` URLs, preserving the original library files while still configuring the requested ports. Fixes [#20030](microsoft/aspire#20030). ([#20110](microsoft/aspire#20110), backport of [#20031](microsoft/aspire#20031), @bart-vmware, @JamesNK) - 🍎 **Updated the Aspire Homebrew cask for Homebrew 6.x** — Replaced deprecated cask URL and post-install syntax with the supported equivalents, resolving compatibility issues with current Homebrew while preserving install-channel metadata. ([#20119](microsoft/aspire#20119), backport of [#19965](microsoft/aspire#19965), @askpt, @joperezr) - 🧪 **Radius cloud-provider callback interfaces now carry the experimental diagnostic** — `IAwsRadiusProviderBuilder` and `IAzureRadiusProviderBuilder` are now marked with `ASPIRERADIUS003`, matching the existing `WithAwsProvider` and `WithAzureProvider` methods. Code referencing these interfaces directly must now acknowledge the same experimental API diagnostic. ([#19874](microsoft/aspire#19874), @sebastienros) --- *Full Changelog: [v13.5.3...v13.5.4](microsoft/aspire@v13.5.3...v13.5.4)* *Full commit: [9c1b401dd67746739044f68959cbf4d3d7af93a6](microsoft/aspire@9c1b401dd67746739044f68959cbf4d3d7af93a6)* Commits viewable in [compare view](microsoft/aspire@v13.5.3...v13.5.4). </details> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: cluckwork-lockfix[bot] <cluckwork-lockfix[bot]@users.noreply.github.com>
Description
Fixes #18790
When a DevTunnel region is selected automatically,
devtunnel showresolvesthe bare tunnel ID and returns a cluster-qualified ID. Per-port access queries
require that qualified form.
Use the returned tunnel ID for tunnel and port access queries.
Checklist